<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>湿地入口</title>
    <!-- jquery - boot -库文件 -->
    <script src="__PUBLIC__/script/jquery.1.11.1.js"></script>
    <script src="__PUBLIC__/script/bootstrap.min.js"></script>
    <!-- Bootstrap -->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap -->
    <!-- font awesome -->
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/FontAwesome/css/font-awesome.min.css">
    <script src="__PUBLIC__/script/common.js"></script>
    <!--easyui包含文件-->
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/easyui1.5.3/themes/material/easyui.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/easyui1.5.3/themes/icon.css">
    <script type="text/javascript" src="__PUBLIC__/plugins/easyui1.5.3/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/plugins/easyui1.5.3/locale/easyui-lang-zh_CN.js"></script>
    <!--layer-->
    <script type="text/javascript" src="__PUBLIC__/plugins/layer/layer.js"></script>
    <!-- 自定义 css -->
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/reset.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css">
    <!-- end easyui -->
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="__PUBLIC__/script/html5shiv.js"></script>
    <script src="__PUBLIC__/script/respond.js"></script>
    <![endif]-->
</head>

<body>
<include file="Public/header" />
<!-- indexmain -->
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12 mainbox" id="mainbox">
            <!--menubegin-->
            <div class="datamenubox" id="leftmenu">
                <div class="menuhead">数据管理</div>
                <!-- treein -->
                <div class="treein" id="menuin">
                    <ul class="list-group smenu">
                        <volist name="menulist" id="vo">
                            <a href="{:U($vo[url])}"><li class="list-group-item" id="{$vo.url}"><i class="fa fa-angle-right"></i>{$vo.name}</li></a>
                        </volist>
                    </ul>
                </div>
            </div>
            <!--menuend-->
            <!--mainboxbegin-->
            <div class="col-md-12 rights" id="right">
                <!-- 位置导航 -->
                <ol class="breadcrumb">
                    <li class="active">首页</li>
                    <li class="active">数据管理</li>
                    <li class="active">湿地入口</li>
                </ol>
                <!-- 筛选 -->
                <div class="searchitem">
                    <div class="row">
                        <div class="col-md-12">
                            <input class="easyui-textbox" name="q_name" id="q_name" style="width:300px" data-options="label:'上传时间：',required:false">
                            <button class="btn btn-danger" id="querybtn">查询</button>
                            <button class="btn btn-danger" id="daochubtn">导出</button>
                        </div>
                    </div>
                    <div class="blank10"></div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="btnin">

                            </div>
                        </div>
                    </div>
                    <!-- end 筛选 -->
                </div>
                <!-- listtable -->
                <div>
                    <!-- gridview row -->
                    <table id="dg"></table>
                    <!-- end gridview row -->
                </div>
                <!--mainboxend-->
            </div>
        </div>
    </div>
    <!-- indexmain end -->
    <!-- modals -->
    <!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- /modals -->
<include file="Public/footer" />
<script>
    $(document).ready(function() {
        //初始化页面
        $('#sdrk').addClass('on');
        loaddg();
        LoadDDL('role','ROLE');
    });
    // $(function(){
    //     setInterval(loaddg,3000);
    // });
    //加载数据列表
    function loaddg() {
        $('#dg').datagrid({
            loadMsg: '正在查询，请稍后...',
            title: '湿地入口',
            height: $(window).height() - 300,
            url: '{:U(\'querysdrk\')}',
            queryParams: {
                username: $('#q_name').textbox('getValue')
            },
            nowrap: false,
            striped: true,
            collapsible: false,
            loadMsg: '正在加载，请稍后。。。',
            remoteSort: false,
            singleSelect: true,
            pageSize: 100,
            idField: 'id',
            pagination: true,
            rownumbers: true,
            pagination: true,
            pageNumber: 1,
            pageSize: 20,
            pageList: [20, 40, 80, 160],
            fitColumns: true,
            columns: [
                [{
                    field: 'cod',
                    title: '化学需氧量',
                    width: 100
                }, {
                    field: 'nh3_n',
                    title: '氨氮',
                    width: 100
                }, {
                    field: 'tp',
                    title: '总磷',
                    width: 100
                }, {
                    field: 'tn',
                    title: '总氮',
                    width: 100
                }, {
                    field: 'ss',
                    title: '悬浮物',
                    width: 100
                }, {
                    field: 'hdsw',
                    title: '河道水位',
                    width: 100
                }, {
                    field: 'ssll',
                    title: '实时流量',
                    width: 100
                }, {
                    field: 'zrll',
                    title: '昨日流量',
                    width: 100
                }, {
                    field: 'zljll',
                    title: '总累计流量',
                    width: 100
                }, {
                    field: 'wt',
                    title: '水温',
                    width: 100
                }, {
                    field: 'scsj',
                    title: '上传时间',
                    width: 100
                },]
            ]
        });
        $("#querybtn").click(function() {
            $('#dg').datagrid('load', {
                "scsj": $('#q_name').textbox('getValue')
            });
        });
        $('#daochubtn').click(function(){
            expzb();
        })
        function expzb(){
            window.location.href="{:U('portrk')}";
        }
    }

</script>
</body>

</html>